Mega Code Archive

Categories
1) Android
2) ASP.Net
3) ASP.Net Tutorial
4) C
5) C Tutorial
6) C#
7) C# Book
8) C# by API
9) C# Tutorial
10) C++
11) C++ Tutorial
12) Delphi
13) Flash ActionScript
14) Flex
15) Java
16) Java Book
17) Java by API
18) Java Tutorial
19) JavaScript DHTML
20) JavaScript Reference
21) JavaScript Tutorial
22) MSOfficeExcel 2007 Tutorial
23) MSOfficePowerPoint 2007 Tutorial
24) MSOfficeWord 2007 Tutorial
25) MSSQL
26) MSSQL Tutorial
27) MySQL
28) MySQL Tutorial
29) Oracle PLSQL
30) Oracle PLSQL Tutorial
31) Perl
32) Php
33) PostgreSQL
34) Python
35) Python Tutorial
36) Ruby
37) Silverlight
38) VB.Net
39) VB.Net by API
40) VB.Net Tutorial
41) Visual C++ .NET
42) VisualBasic Script
43) XML
44) XML Tutorial
 
VisualBasic Script
1) Access
2) Application
3) Data Type
4) Data Type Functions
5) Date Functions
6) Excel
7) File Path
8) Forms
9) Language Basics
10) Math Functions
11) Outlook
12) Powerpoint
13) String Functions
14) Windows API
15) Word
16) XML
Access
1) A Basic Example Using ADOMD
2) A Recordset That Does Not Support the RecordCount Property
3) A Recordset That Supports the RecordCount Property
4) A Simple Connection Example
5) Accessing Data with the Fields Collection and Field Objects
6) AcImportDelim
7) AcImportFixed
8) Activate toolbar with DoCmd ShowToolbar
9) AdAsyncExecute - The source is executed asynchronously
10) AdAsyncFetch - The initial quantity specified in the Initial Fetch Size property is fetched
11) AdAsyncFetchNonBlocking - The main thread never blocks when fetching
12) AdCmdFile - The source is evaluated as a persisted recordset
13) AdCmdStoredProc - The provider evaluates the source as a stored procedure
14) AdCmdTable - A SQL query is generated to return all rows from the table named in the source
15) AdCmdTableDirect - The provider returns all rows in the table named in the source
16) AdCmdUnknown - The type of command in the source is unknown
17) Add a new user
18) Add Edit Range
19) Add group
20) Add new a row to recordset
21) Add new property to TableDef
22) Add or delete users
23) Add user to group
24) Add where clause to the select statement
25) Adding a Field with SQL command
26) Adding a Multiple-Field Index to an Existing Table
27) Adding a New Field to a Table
28) Adding a New Money type Field to an Existing Table
29) Adding a New Record to a Recordset
30) Adding a New Record to a Table
31) Adding a Primary Key to a Table with SQL command
32) Adding a Single-Field Index to an Existing Table (Intrinsic constants for the IndexNulls property of the ADOX Index object)
33) Adding a Single-Field Index to an Existing Table with SQL command
34) Adding a Unique Index Based on Two Fields to an Existing Table
35) Adding a User to a New Group
36) Adding Controls to the Report
37) AdInteger and adWChar
38) ADO Equivalents to Access Data Types
39) Alter table to delete an Index with SQL command
40) Append new columns to new table
41) Arrow key, page up, page down key
42) Assigning Recordsets Dynamically to a form
43) Auto-Generate an Index Using VBA
44) Build a string text from result set
45) Build the SQL statement dynamically
46) Build user list
47) Building a New Web Query with VBA
48) Call delete method in Recordset
49) Call store procedure
50) Call update method from Recordset
51) Change column data case
52) Change the password of the database from smith to jones
53) Changing a User Password
54) Changing a User Password with SQL command
55) Changing Options
56) Changing the Access Environment
57) Changing the Field Data Type with SQL command
58) Changing the Size of a Field with SQL command
59) Changing the Start (Seed) Value of the AutoNumber Field with SQL command
60) Check after using the MoveNext method whether the end of the file has been reached
61) Check table definition
62) Check the keycode
63) Check the Recordset affected
64) Checking for Existence of a Field
65) Checking for Existence of Tables
66) Checking Permissions for a Specific Object
67) Close form without saving
68) Closes the Workspace
69) Closing a Database
70) Command Execute method
71) Compacting a Database
72) Configuration of LockType as a Property of the Recordset Object
73) Connect to current database
74) Connect to database with user name and password
75) Connect to databse through URL
76) Connect to JET
77) Connect to Oracle
78) Connecting to an SQL Server Database
79) Connecting to an SQL Server Using a DSN-less Connection
80) Connecting with Microsoft Access with ADODB Connection
81) Connection error handler
82) Connection String to Access database
83) Connection to database
84) Controlling Autonumber Fields
85) Converting the Recordset to a String
86) Copy Records to a Text File
87) Copying Records to a Word Document (Example 1)
88) Copying Records to an Excel Spreadsheet
89) Counting the Number of Returned Records
90) Creat a SQL statement and append parameter as ceriteria
91) Create a named report
92) Create a new database
93) Create a primary key
94) Create a relation
95) Create a stored procedure
96) Create a table with ADOX Table and ADO data type
97) Create a table with validation rule
98) Create an index
99) Create new database
100) Create new field with validation rule
101) Create Query by using the Database CreateQueryDef
102) Create Relation
103) Create user for Access database
104) Create view
105) Creates a QueryTable object on the active worksheet and sets its data source to a single table from a Web page at the designated lo
106) Creating a Connection Object
107) Creating a Custom Recordset
108) Creating a Design Master
109) Creating a Disconnected Recordset
110) Creating a Full Replica
111) Creating a Group Account
112) Creating a Group Account with SQL command
113) Creating a Link to an Access Table Stored in Another Database
114) Creating a List of Database Tables(Types of tables in the ADOX Tables collection)
115) Creating a New Microsoft Access Database Using ADO
116) Creating a One-to-Many Relationship
117) Creating a Parameter Query
118) Creating a Pass-Through Query with ADOX
119) Creating a Password Programmatically with SQL command
120) Creating a Primary Key
121) Creating a Primary Key Index with Restrictions with SQL command
122) Creating a Query Using Code
123) Creating a Recordset Using a Connection Object
124) Creating a Recordset Using a Connection String
125) Creating a Recordset Using the ActiveConnection Property
126) Creating a Select Query with ActiveX Data Objects
127) Creating a Single-Field Primary Key with SQL command
128) Creating a SQL Server Connection Object with Integrated Security
129) Creating a SQL Server Connection Object with SQL Server Security
130) Creating a Stored Procedure that Accepts Parameters
131) Creating a Table (ADOX data types vs Microsoft Access data types)
132) Creating a Table in a New Database with AUTOINCREMENT column
133) Creating a Table in the Current Database with SQL statement
134) Creating a Table with a Single-Field Index with SQL command
135) Creating a Table with a Validation Rule Referencing a Column in Another Table
136) Creating a User Account
137) Creating a User Account with SQL command
138) Creating a View Based on a Table with SQL command
139) Creating an Empty Report
140) Creating an Index Based on Two Fields with SQL command
141) Creating an Index that Disallows Null Values in the Key with SQL command
142) Creating an Index with the Ignore Null Option with SQL command
143) Creating an XML Document from ADO
144) Creating Check Constraints
145) CurrentProject Connection
146) Database properties
147) Database relations
148) Deactivate toolbar DoCmd ShowToolbar
149) Declares a Variant variable named myBookmark and then assigns to it a bookmark representing the current record in an ADO recordset.
150) Default Column value
151) Default Record Locking
152) Delete a column
153) Delete a query
154) Delete backup tables
155) Delete row for a certain criteria
156) Delete user list
157) Deleting a Database File
158) Deleting a Database Password with SQL command
159) Deleting a Field from a Table with SQL command
160) Deleting a Field that is a Part of an Index with SQL command
161) Deleting a Group Account
162) Deleting a Group Account with SQL command
163) Deleting a Record
164) Deleting a Stored Procedure
165) Deleting a Stored Query
166) Deleting a Table from a Database
167) Deleting a Table with SQL command
168) Deleting a User Account
169) Deleting a User Account with SQL command
170) Deleting a View with SQL command
171) Deleting an Existing Record from Recordset
172) Deleting an Index with SQL command
173) Deleting Indexes from a Table
174) Deleting Records via ADO
175) Designating the Cursor Location
176) Does it support bookmark
177) Does Recordset support Bookmark(adBookmark)
178) Does Recordset support Move Previous (adMovePrevious)
179) Does Recordset support Seek (adSeek)
180) Does Recordset support Update Batch (adUpdateBatch)
181) DSN-less connection using the SQLOLEDB provider
182) Dynamic Recordset
183) Embedding a Database Password in Code
184) Emport table as XML file
185) Encrypting a Database
186) Enumerate group and users
187) Enumerate groups and users
188) Enumerate the properties of current database
189) Establishing a Connection to the Current Access Database
190) Establishing a Link to an External Table
191) Establishing Relationships Using Code
192) Execuate query
193) Execute the view
194) Executing a Parameterized Stored Procedure
195) Executing a Pass-Through Query Saved in Access
196) Executing a Select Query
197) Executing a SQL Statement Containing Parameters
198) Executing a Stored Procedure Containing Parameters
199) Executing an Update Query
200) Executing an Update Query using the Command Object
201) Export database
202) Export table as html page
203) Export table as htx file
204) Export table as rtf file
205) Export table as txt file
206) Export table as xls file
207) Export table to asp page
208) Export table to html file
209) Export to a Comma Separated File
210) Export to a Fixed Width File
211) Export to an XML file
212) Exporting to a Database
213) Exporting to a Spreadsheet
214) Filling a Combo Box with a Disconnected Recordset
215) Filtering a Recordset
216) Filtering a Recordset by using the Date type field
217) Filtering Records Using the Filter Property
218) Filtering Records with an SQL Clause
219) Find record by using Recordset FindFirst
220) Finding a Record Based on Multiple Criteria
221) Finding a Specific Record in a Recordset
222) Finding Records Using the Find Method
223) Finding Records Using the Seek Method (Seek constants)
224) Finding the Record Position
225) Generating a List of Saved Views
226) Get all report history
227) Get current project from Application object
228) Get database from Workspace
229) Get DISTINCT records
230) Get DISTINCTROW
231) Get field properties
232) Get more than one column
233) Get only one column
234) Get Recordset content by calling Recordset GetString
235) Get result set by column name
236) Get rows from Recordset
237) Get Table documents
238) Get the created query name
239) Get the number of recorders which meet the criteria
240) Get the Number of Returned Records
241) Get the top 10 percent
242) Get the top 5 percent
243) Get the updated record count
244) Get Workspaces count and name
245) Granting Permissions for Tables to an Existing Group with SQL command
246) Import an XML file
247) Import database
248) Import XML file
249) Importing from a Comma Separated File
250) Importing from a Fixed Width File
251) Importing Spreadsheet Data Using Code
252) Importing Text Data Using Code
253) Include the database version information with the JetOLEDB
254) Inner Join
255) Iterate through all modules located in the database referenced by the CurrentProject object
256) Iterates the AllTables collection looking for a table whose name includes the substring Backup
257) Iterates the AllTables collection to determine if a table is open If it is, it prompts the user to close it
258) Iterates the AllTables collection, opens each nonsystem table, prints its structure, and then closes the open table
259) Iterates through the AllForms collection of the CurrentProject, printing the name of each form
260) Linking to an External Table
261) List group user
262) List table properties
263) List table types
264) Listing All Group Accounts
265) Listing All Saved Queries in a Database
266) Listing All User Accounts
267) Listing Field Properties
268) Listing Indexes in a Table
269) Listing Table Properties
270) Listing Tables and Their Fields Using the OpenSchema Method
271) Listing Users in Groups
272) Lists the tables in the LIBRARY database
273) Loop through all forms
274) Loop through all queries in the database referenced by the CurrentData object
275) Loop through all used range
276) Loop through each table in the database by the CurrentData object
277) Loop through each table in the database referenced by the CurrentData object
278) Loop through the ResultSet after executing select statement
279) Looping Through a Recordset
280) Makes the admin account the owner of the new workspace
281) Making a Copy of a Table
282) Making a User Account a Member of a Group with SQL command
283) Making Bulk Changes
284) Marking Records with a Bookmark
285) Modifying a Record
286) Modifying a Select Query
287) Modifying One Record at a Time
288) Modifying Table Data Using ADO Code
289) Move cursor in a Recordset with MoveNext
290) Move cursor in result set
291) Move the resultset cursor with MoveNext method
292) Moves 5 records backward from the current record in a DAO recordset
293) Moving Around in a Recordset
294) Moving Through the Records in a Recordset
295) Navigate through a recordset
296) NoMatch property in Recordset
297) Open a table and read data by column
298) Open a worksheet through OLEDB
299) Open an Access database on the server
300) Open dBase file and query data
301) Open report
302) Open the recordset, designating that the source is a SQL statement based on more than one table
303) Open up a schema with a provider to look at all the database objects
304) Opening a DAO Recordset Using a SQL SELECT Statement
305) Opening a DAO Recordset Using a Table
306) Opening a Database in Read-Only Mode
307) Opening a Database in ReadWrite Mode
308) Opening a Database Secured at the User Level
309) Opening a dBASE file with ADO
310) Opening a Microsoft Jet Database in ReadWrite Mode
311) Opening a Password-Protected Database
312) Opening a Recordset
313) Opening a Recordset Based on a Table or Query
314) Opening a Recordset Based on a Table or Query with SQL command
315) Opening a Recordset Based on an SQL Statement
316) Opening a Recordset Based on Criteria
317) Opening a Recordset Directly
318) Opening a Recordset with Inconsistent Updates
319) Opening a Text File with ADO
320) Opens Database in exclusive mode with readwrite access
321) Options of Open Method
322) Order by two fields
323) Order record in a decscending order
324) Order the resultset with Order by clause
325) Output table to asp file
326) Pass parameter to a query
327) Performing Batch Updates
328) Print preview Report
329) Prompting the User for the Database Path and Name
330) Protect from mark
331) Read record in recordset by referening the field name with !
332) Read specific columns from Recordset
333) Read table schema
334) Reading a Persisted Recordset
335) Recordset Open method
336) Reference column name from TableDefs
337) Reference database from DBEngine
338) Reference recordset and table with DBEngine
339) Reference TableDefs from DBEngine
340) Refreshing a Link
341) Refreshing Recordset Data
342) Relating Two Tables and Setting up Cascading Referential Integrity Rules
343) Remove Edit Ranges
344) Remove extraneous rows and columns and reset the last cell
345) Removing a Field from a Table
346) Removing a Table Using Code
347) Removing a User Account from a Group with SQL command
348) Report Error Event
349) Report Open event
350) Requiring Password Validation
351) Reset any values you set
352) Retrieve data from Recordset by table column name
353) Retrieve the last-assigned autonumber value
354) Retrieving Field Values
355) Retrieving the Name of the Object Owner
356) Revoking Security Permissions with SQL command
357) Rollback a transaction
358) Row order in Dynamic Recordset
359) Run a command through current project
360) Running Parameter Queries
361) Save Bookmark to an array
362) Save Recordset to a file
363) Save table to a collection
364) Save the recordset as an XML file
365) Saving Records to a Disk File
366) Select all columns
367) Select specific column in select statement
368) Set and get the lock type
369) Set column properties by using ADOX Table
370) Set Cursor Location to adUseClient
371) Set CursorLocation to adUseServer
372) Set CursorType to adOpenDynamic
373) Set CursorType to adOpenForwardOnly
374) Set CursorType to adOpenKeyset
375) Set CursorType to adOpenStatic
376) Set Index and seek the recordset
377) Set Lock Type to adLockOptimistic
378) Set new property to database
379) Set recordset to form
380) Sets the locking type in the call to the Open method
381) Setting a Database Password
382) Setting a Database Password with SQL command
383) Setting a Default Value for a Field with SQL command
384) Setting User Permissions for a Database
385) Setting User Permissions for an Object
386) Setting User Permissions for Containers
387) Shift key, alt key and control key mask
388) Show all foreign tables from a relation
389) Show all permissions
390) Show delete permission
391) Show Edit Ranges
392) Show field name, type and value data type
393) Simple Select statement
394) Snapshot Recordset
395) Sorting Records
396) SQL with where clause
397) Sub addJetSqlUser()
398) Sub KeepEmOut()
399) Sub Report_Close()
400) Sub Report_NoData(Cancel As Integer)
401) Sub Report_Open(Cancel As Integer)
402) Supplying the CursorType as a Parameter of the Open Method
403) Supplying the CursorType as a Property of the Recordset Object
404) Table documents
405) The AllMacros collection allows you to iterate through all macros stored in the current project
406) The AllReports collection allows you to loop through all reports in the current project
407) The Errors Collection
408) The Page event gives you the opportunity to do something immediately before the formatted page is sent to the printer
409) The RecordCount Property Is Not Supported with a Forward-Only Recordset
410) The Sort Property of the Recordset Object
411) The Supports Method of the Recordset Object
412) The VerifyLink Routine
413) To create a new group account in the current database
414) To show that the CurrentDb function adds to the Databases collection
415) Transaction Processing in Access 2007 Using BeginTrans, Logging, CommitTrans, and RollbackTrans
416) Transfer database acExport
417) Transfer database through ODBC
418) Transfer SQLServer database
419) Unlock Edit Range
420) Update a table
421) Update a table with QueryDef
422) Update Recordset
423) Use ! to reference column in a recordset
424) Use Access Special Keys
425) Use AddNew and specify the field information
426) Use AddNew method from Recordset and two arrays to add a new row
427) Use ADODB Command to create a view
428) Use and to combine conditions
429) Use Between And
430) Use between and with number type column
431) Use Date function in where clause
432) Use DBEngine to reference tables and its columns
433) Use dbOpenSnapshot when opening an recordset
434) Use Do while to loop through until EOF
435) Use IN and like in where clause
436) Use IN in select statement
437) Use Is not null
438) Use Is NULL to check if a column is null
439) Use Not In
440) Use OLEDB to connect with mdb file
441) Use optimictic lock to open recordset
442) Use parameter name connection string
443) Use Recordset filter
444) Use Recordset Support to check the supported features
445) Use Row Level Locking
446) Use seek method in Recordset
447) Use Select all
448) Use SUM in sql statement
449) Use the CompactRepair method of the Application object to compact and repair the database
450) Use the EXECUTE statement to execute the stored procedure
451) Use the report object variable to point at each report in the Reports collection
452) Use transaction
453) Use where clause and order by clause together
454) Use wild card character in link
455) Use With statement with CurrentProject
456) User Defined Property
457) User InputBox to read SQL statement parameter
458) Using a CHECK Constraint to Specify a Condition for All Values Entered for the Column
459) Using a Command Object to query table
460) Using a Database Transaction to Insert Records
461) Using a Stored Procedure to Make Bulk Changes to Data in a SQL Server Database
462) Using Bookmarks to Filter Records
463) Using CreateParameter to delete a company record
464) Using Date field type in select statement
465) Using the AbsolutePosition Property
466) Using the Areas Collection to Return a Noncontiguous Range
467) Using the Bookmark Property
468) Using the EOF Property to Determine the Bounds of a Recordset
469) Using the Open Database Method
470) Using the OpenSchema Method to List Database Tables
471) Using the Recordset Movements() Methods on a Recordset Object
472) Using the SpecialCells method to select all the blanks in this range is one way to quickly fill in all the blank region cells with
473) Using the TransferDatabase Method
474) Using the VBA Err Object and ADO Errors Collection
475) Using VBA to Update an Existing Web Query
476) Whether Records Are Returned in a Recordset
477) Working with the Used Range
478) Writing the Form_KeyDown Event Procedure
479) Writing the Form_KeyPress Event Procedure
480) Writing the Form_KeyUp Event Procedure
481) You must use a pound symbol (#) when delimiting dates for Microsoft Access, like this